﻿using Dou.UI;
using UnityEngine;

namespace Simple
{
    public class Test_CardSlot : MonoBehaviour
    {
        public Droppable droppable;

        public GameObject rect;

        void Start()
        {
            droppable.onDropped.AddListener(draggable =>
            {
                var dragCard = draggable.GetComponent<Test_DragCard>();
                
                Debug.Log(dragCard.data);
            });
            droppable.onDragEnter.AddListener(draggable =>
            {
                rect.SetActive(true);
            });
            droppable.onDragExit.AddListener(draggable =>
            {
                rect.SetActive(false);
            });
        }
    }
}
